package com.shaliy.collector.util;

import java.io.File;

public class CalendarUtil {
	
	static int count = 0;
	
	public static void main(String[] args) {
        File f=new File("D:\\workspace");
        printFile(f,0);
        

        System.out.println(count);
    }
    static void  printFile(File file,int level){
        	//输出层数
        	for(int i=0;i<level;i++){
        		System.out.print("-");
        	}
        	System.out.println(file.getName());
        	count++;
        if(file.isDirectory()){
            File[] files=file.listFiles();
            for(File temp:files){
                printFile(temp,level+1);
            }

        }
    }
}
